<?php

$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("player_profile", $con);
$type = $_GET['type'];
$select = sprintf("Select distinct award_title from awards where type='%s'", mysql_real_escape_string($type));
$result = mysql_query($select);
while($r = mysql_fetch_assoc($result)){
	$rows[] = $r;
}
echo json_encode($rows);

?>